package PTA;

import java.util.Scanner;

public class Pta09 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = 0;
        int y = 0;
        for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            if (a % 2 == 0) {
                x += a;
            } else {
                y += a;
            }
        }
        System.out.println("奇数和=" + y + ", " + "偶数和=" + x);
    }
}
